package com.tedu.dao.repository.Impl;

import com.tedu.dao.mapper.OrdersMapper;
import com.tedu.dao.repository.OrdersRepository;
import com.tedu.pojo.entity.Orders;
import com.tedu.pojo.vo.HotelRoomVo;
import com.tedu.pojo.vo.HotelVo;
import com.tedu.pojo.vo.OrdersListVo;
import com.tedu.pojo.vo.TravelVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class OrdersRepositoryImpl implements OrdersRepository {
    @Autowired
    private OrdersMapper ordersMapper;

    @Override
    public OrdersListVo listByUserId(Long userId) {
        return ordersMapper.listByUserId(userId);
    }

    @Override
    public OrdersListVo GetByOrderNo(String orderNo) {
        return ordersMapper.GetByOrderNo(orderNo);
    }

    @Override
    public HotelVo selectByHotelId(Long HotelId) {
        return ordersMapper.selectByHotelId(HotelId);
    }

    @Override
    public HotelRoomVo selectByCategoryId(Long HotelId, Integer CategoryId) {
        return ordersMapper.selectByCategoryId(HotelId,CategoryId);
    }

    @Override
    public TravelVo selectByTravelId(Long TravelId) {
        return ordersMapper.selectByTravelId(TravelId);
    }

    @Override
    public int insertAddOrderNew(Orders orders) {
        return ordersMapper.insertAddOrderNew(orders);
    }
}
